NickName:Ingun전인건 Ask DateTime:2020-01-28T23:50:56 How the type `Fix` and function `fix` are same in Haskell? I'm trying to convince myself that type Fix and function fix are the same thing. But I can't find the correlation between their definitions -- definition of fix fix :: (p -> p) -> p fix f = let {x = f x} in x -- or fix f = f (fix f) -- definition of Fix newtype Fix f = Fix { unFix :: f (Fix f) } How does the constructor Fix fit into the form of (x -> x) -> x? Copyright Notice:Content Author:「Ingun전인건」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.Link to original article:https://stackoverflow.com/questions/59952446/how-the-type-fix-and-function-fix-are-same-in-haskell Answers chepner 2020-01-28T15:55:36 Look at the kind of the type constructor Fix:\n\n> :k Fix\nFix :: (* -> *) -> *\n\n\nThe type constructor Fix is what's analogous to the function fix.\n\nThe data constructor is something else. Following the explanation found in Understanding F-Algebras, Fix is an evaluator: it evaluates a term of type f (Fix f) to produce a value of type Fix f. This evaluation is lossless; you can recover the original value from the result using unFix.",